package hu.monitor.server.scrap;

import hu.monitor.server.AgentNotFoundException;
import hu.monitor.server.remoting.AgentClientProxyFactory;

import java.io.FileNotFoundException;

import javax.inject.Inject;
import javax.inject.Named;

@Named("AgentInvoker")
public class AgentInvoker {
	@Inject
	private AgentClientProxyFactory factory;

	public void invokeFoo() throws AgentNotFoundException {
		this.factory.getTest(2).foo();
	}

	public void invokeEx() throws AgentNotFoundException {
		try {
			this.factory.getTest(2).ex();
		} catch (final FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		};
	}
}
